package com.hema.auction.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.luck.picture.lib.entity.LocalMedia;
import com.hema.auction.R;
import com.hema.auction.utils.GlideUtils;

import java.util.List;

/**
 * author by john
 */

public class SelectImgAdapter extends BaseQuickAdapter<LocalMedia, BaseViewHolder> {

    public SelectImgAdapter(@Nullable List<LocalMedia> data) {
        super(R.layout.layout_select_img_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LocalMedia item) {
        ImageView ivImg = helper.getView(R.id.iv_img);
        GlideUtils.load(mContext,item.getPath(),ivImg);
        helper.addOnClickListener(R.id.iv_img);
        helper.addOnClickListener(R.id.iv_del);
//        Glide.with(mContext).load(item).placeholder(R.drawable.ic_defaul_image).into(ivImg);
    }
}
